int numMatchingSubseq(char* s, char** words, int wordsSize) {
    char* cur1 = s;
    char* cur2 = words[0];
    int count = 0;
    int flag = 0;

    for (int i = 0; i < wordsSize; i++)
    {
        cur1 = s;
        cur2 = words[i];
        if (i != 0 && strcmp(words[i], words[i - 1]) == 0 && flag)
        {
            count++;
        }
        else if (i != 0 && strcmp(cur2, words[i - 1]) == 0 && !flag)
        {
            continue;
        }
        else
        {
            while (*cur1 && *cur2)
            {
                if (*cur1 == *cur2)
                {
                    cur2++;
                }
                cur1++;
            }
            if (*cur2 == '\0')
            {
                flag = 1;
                count++;
            }
            else
            {
                flag = 0;
            }
        }

    }

    return count;
}